package com.neutech.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neutech.mapper.Hospital_keshiMapper;
import com.neutech.po.Hospital_doc;
import com.neutech.po.Hospital_keshi;

@Service
public class UserService {
	@Autowired
	private Hospital_keshiMapper hospital_keshiMapper;
	public void getAlla() {
		List<Hospital_keshi> list = hospital_keshiMapper.getAlla();

		for (Hospital_keshi keshi : list) {
			System.out.println("在:" + keshi.getKeshi() + "部门  有");
			List<Hospital_doc> doca = keshi.getDoca();
			for (Hospital_doc doc : doca) {
				System.out.println("医生:" + doc.getDname());
			}
		}
	}
	public void updatedname(){
		Hospital_doc hospital_doc = new Hospital_doc();
		hospital_doc.setDname("迪迦奥特曼");
		hospital_doc.setId(1);
		hospital_keshiMapper.updatea(hospital_doc);
	}
	public void deleteById(){
		hospital_keshiMapper.deletea(1);
	}
	public void adddname(){
		hospital_keshiMapper.adda("唐三");
	}
}
